<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8" language="java"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="javax.jdo.PersistenceManager"%>
<%@page import="com.wutianyi.google.factory.PMF"%>
<%@page import="javax.jdo.Query"%>
<%@page import="java.util.List"%>
<%@page import="com.wutianyi.google.bean.FormBean"%>
<html>
<head>
	<link type="text/css" rel="stylesheet" href="main.css"/>
</head>
<body>
<%
	PersistenceManager pm = PMF.get().getPersistenceManager();
	Query query = pm.newQuery("select from " + FormBean.class.getName() );
	List<FormBean> beans = (List<FormBean> )query.execute();
	request.setAttribute("beans", beans);
%>
<div id="wpwrap">
	<%@include file="header/header.jsp"%>
	<%@include file="header/menu.jsp" %>
	<div id="wpcontent">
		<ul>
			<c:forEach items="${beans}" var="bean" varStatus="status">
				<li <c:if test="${status.index % 2 == 0 }">class="odd"</c:if>><a href="/form.jsp?kId=${bean.key.id }&type=${bean.key.kind}" target="_blank">${bean.name }</a> <span><a href="#">删除</a>|<a href="/addForm?kId=${bean.key.id }">修改</a></span></li>
			</c:forEach>
		</ul>
	</div>
	
</div>

<%
	pm.close();
%>
</body>
</html>